package study.eventlisten.interfaceimpl;

import org.springframework.context.ApplicationEvent;

/**
 * 自定义事件以及监听
 * 这个是事件类
 * 我们需要定义一个时间（MyEvent)，需要继承Spring的ApplicationEvent
 */
public class MyEvent extends ApplicationEvent {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String msg ;

    public MyEvent(Object source,String msg) {
        super(source);
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
